<?php

namespace App\Http\Controllers\Admin;

use Illuminate\Http\Request;
use Gregwar\Captcha\CaptchaBuilder;
use App\Http\Controllers\Controller;

class EntryController extends Controller
{
    //

    public function __construct()
    {
        //调用自己定义的中间件
        $this->middleware('AdminLogin');
    }

    public function code(){
        $builder = new CaptchaBuilder();
        $builder->build();
        header('Content-type: image/jpeg');
        $builder->output();

    }
    public function index(){
        //加载后台首页模板
        return view('admin.entry.index');
    }

}
